package org.jeecg.modules.database.sharding.dict;

public enum LogTypeEnum {
    /**
     * 操作日志
     */
    OPERATION(2, "操作日志"),
    /**
     * 登录日志
     */
    LOGIN(1, "登录日志");

    private Integer key;
    private String value;

    LogTypeEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getDictValue(Integer logType) {
        for (LogTypeEnum logTypeEnum : LogTypeEnum.values()) {
            if (logTypeEnum.getKey().equals(logType)) {
                return logTypeEnum.getValue();
            }
        }
        return null;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
